<%@ Control Language="VB" AutoEventWireup="false" CodeFile="CustomDropDown.ascx.vb"
    Inherits="UserCuntrols_CustomDropDown" %>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline">
    <ContentTemplate>
        <asp:HiddenField ID="hidDropdown" runat="server" />
        <asp:TextBox ID="txtDropdown" ReadOnly="true" runat="server" CssClass="dropdownText"
            Text=" -- Select -- "></asp:TextBox>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="lnkBack" EventName="Click"></asp:AsyncPostBackTrigger>
        <asp:AsyncPostBackTrigger ControlID="lnkBackMain" EventName="Click"></asp:AsyncPostBackTrigger>
        <asp:AsyncPostBackTrigger ControlID="dlSubCategory" EventName="ItemCommand"></asp:AsyncPostBackTrigger>
    </Triggers>
</asp:UpdatePanel>
<asp:HyperLink ID="tx" Style="margin-left: -6px;" runat="server" CssClass="dropdownarrow"
    href="javascript:void(0);">
    <asp:Image ID="imgDropdown" runat="server" ImageUrl="~/images/btnDropdown.gif" Style="margin-top: -6px;" /></asp:HyperLink>
<asp:Panel ID="tx_div" runat="server" CssClass="dropdown" Style="visibility: hidden;
    left: 447px; top: 114px; min-height: 60px; width: 500px;">
    <asp:UpdatePanel ID="UpdatePanelMenu" runat="server" RenderMode="Inline">
        <ContentTemplate>
            <div align="left" style="float: left; width: 60px;">
                <asp:LinkButton CssClass="link" ID="lnkBack" runat="server" Visible="false" CausesValidation="false">
                    <asp:Image ID="imgBack" runat="server" AlternateText="Back" ToolTip="Back" ImageUrl="~/images/Back.gif" />Back
                </asp:LinkButton>
            </div>
            <div style="float: right; width: 100px;" align="center">
                <asp:LinkButton CssClass="link" CausesValidation="false" ID="lnkBackMain" runat="server"
                    Visible="false">Back Menu</asp:LinkButton>
            </div>
            <div align="center">
                <strong>
                    <asp:Literal ID="litHeading" runat="server"></asp:Literal></strong>
            </div>
            <div>
                <asp:DataList ID="dlSubCategory" runat="server" RepeatColumns="4" RepeatDirection="Horizontal"
                    CellSpacing="5" HorizontalAlign="Left">
                    <ItemTemplate>
                        <asp:LinkButton CssClass="link" ID="lnk1" CausesValidation="false" title='<%#Eval("Text")%>'
                            runat="server" CommandArgument='<%#Eval("CategoryID")%>' CommandName='SelectCategory'><%#PopulateImage(Eval("Image")) %>
                            <%#Eval("Text")%></asp:LinkButton>
                    </ItemTemplate>
                </asp:DataList>
                <div align="center">
                    <asp:Literal ID="litMessage" runat="server"></asp:Literal></div>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="lnkBack" EventName="Click"></asp:AsyncPostBackTrigger>
            <asp:AsyncPostBackTrigger ControlID="lnkBackMain" EventName="Click"></asp:AsyncPostBackTrigger>
        </Triggers>
    </asp:UpdatePanel>
</asp:Panel>
